'\"macro stdmacro
.ds Vn Version 1.2
.ds Dt 24 September 1999
.ds Re Release 1.2.1
.ds Dp Jan 14 18:30
.ds Dm 01 pushname.
.ds Xs 59541 4 pushname.gl
.TH GLPUSHNAME 3G
.SH NAME
.B "glPushName, glPopName
\- push and pop the name stack

.SH C SPECIFICATION
void \f3glPushName\fP(
GLuint \fIname\fP )
.nf
.fi

.SH PARAMETERS
.TP \w'\f2name\fP\ \ 'u 
\f2name\fP
Specifies a name that will be pushed onto the name stack.
.SH C SPECIFICATION
void \f3glPopName\fP( void )
.nf
.fi

.SH DESCRIPTION
The name stack is used during selection mode to allow sets of rendering
commands to be uniquely identified.
It consists of an ordered set of unsigned integers and is initially empty.
.P
\%\f3glPushName\fP causes \f2name\fP to be pushed onto the name stack.
\%\f3glPopName\fP pops one name off the top of the stack. 
.P
The maximum name stack depth is implementation-dependent; call
\%\f3GL_MAX_NAME_STACK_DEPTH\fP to find out the value for a particular
implementation. It is an
error to push a name onto a full stack, 
or to pop a name off an empty stack.
It is also an error to manipulate the name stack between the execution of
\%\f3glBegin\fP and the corresponding execution of \%\f3glEnd\fP.
In any of these cases, the error flag is set and no other change is
made to GL state.
.P
The name stack is always empty while the render mode is not \%\f3GL_SELECT\fP.
Calls to \%\f3glPushName\fP or \%\f3glPopName\fP while the render mode is not
\%\f3GL_SELECT\fP are ignored.
.SH ERRORS
\%\f3GL_STACK_OVERFLOW\fP is generated if \%\f3glPushName\fP is called while the
name stack is full.
.P
\%\f3GL_STACK_UNDERFLOW\fP is generated if \%\f3glPopName\fP is called while the
name stack is empty.
.P
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glPushName\fP or \%\f3glPopName\fP
is executed between a call to \%\f3glBegin\fP and the corresponding call to
\%\f3glEnd\fP.
.bp
.SH ASSOCIATED GETS
\%\f3glGet\fP with argument \%\f3GL_NAME_STACK_DEPTH\fP
.br
\%\f3glGet\fP with argument \%\f3GL_MAX_NAME_STACK_DEPTH\fP
.SH SEE ALSO
\%\f3glInitNames(3G)\fP,
\%\f3glLoadName(3G)\fP,
\%\f3glRenderMode(3G)\fP,
\%\f3glSelectBuffer(3G)\fP
